package com.ruoyi.wms.mapper;

import com.ruoyi.common.mybatis.core.mapper.BaseMapperPlus;
import com.ruoyi.wms.domain.entity.ReceiptOrder;
import com.ruoyi.wms.domain.vo.ReceiptOrderVo;
import org.apache.ibatis.annotations.MapKey;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * 入库单Mapper接口
 *
 * @author zcc
 * @date 2024-07-19
 */
public interface ReceiptOrderMapper extends BaseMapperPlus<ReceiptOrder, ReceiptOrderVo> {

    /**
     * 首页不同入库类型的未入库单数量
     */
    @MapKey("optType")
    List<Map<Integer, Integer>> queryUnfinishedReceiptsCount();

    /**
     * 查询时间范围内入库单统计 -按天按月按年
     */
    @MapKey("time")
    List<Map<LocalDateTime, Integer>> queryReceiptOrderTrend(LocalDateTime beginTime, LocalDateTime endTime, Integer granularity, Integer optType, Integer orderStatus);
}
